//
//  DrivesScoreView.m
//  carcareIOS
//
//  Created by ileo on 16/3/2.
//  Copyright © 2016年 baozun. All rights reserved.
//

#import "DrivesScoreView.h"

@interface DrivesScoreView()

@property (nonatomic, strong) UILabel *scoreL; //具体分数
@property (nonatomic, strong) UILabel *unitL;  //分数字体
@property (nonatomic, strong) UILabel *titleL; // 驾驶详情
@property (nonatomic, strong) UIView  *bottomLine;//最下面的线

@end

@implementation DrivesScoreView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = [UIColor whiteColor];
        
        self.scoreL = [Factory labelWithFrame:CGRectMake(0, 0, 100 * __MAIN_RATIO_375 , 80 ) font:FONT_DEFAULT_Light(60) text:@"" textColor:COLOR_HEXSTRING(@"#2090e6") onView:self textAlignment:NSTextAlignmentCenter];
        self.scoreL.center = CGPointMake(self.boundsCenter.x, self.boundsCenter.y - 15);
        
        
        self.unitL = [Factory labelWithFrame:CGRectMake(256 * __MAIN_RATIO_375, 100 , 30 * __MAIN_RATIO_375, 30 ) font:FONT_DEFAULT_Light(13) text:@"分" textColor:COLOR_HEXSTRING(@"#2090e6") onView:self textAlignment:NSTextAlignmentLeft];
        self.unitL.center = CGPointMake(245 * __MAIN_RATIO_375, 90 - 15);
        
        
        self.titleL = [Factory labelWithFrame:CGRectMake(0, 0, __MAIN_WIDTH, 40 ) font:FONT_DEFAULT_Light(13) text:@"" textColor:COLOR_HEXSTRING(@"#919191") onView:self textAlignment:NSTextAlignmentCenter];
        self.titleL.center = CGPointMake(self.boundsCenter.x, 110 );
        //        self.titleL.backgroundColor = [UIColor redColor];
        
        
        self.bottomLine = [[[UIView viewWithFrame:CGRectMake(0, 151 * __MAIN_RATIO_375, __MAIN_WIDTH, 0.5)] resetBackgroundColor:[COLOR_HEXSTRING(@"#F6F6F9") colorWithAlphaComponent:1]] setupOnView:self];
        self.bottomLine.centerY = 151;
    }
    return self;
}

#pragma mark - 

- (void)setScoreText:(NSString *)scoreText{
    _scoreText = scoreText;
    self.scoreL.text = scoreText;
}
-(void)setDetailtitleText:(NSString *)DetailtitleText{
    _DetailtitleText = DetailtitleText;
    self.titleL.text = DetailtitleText;
}

@end
